
import java.util.*;

    public class Test {

        public static void main(String[] args) {
            HashBuck hashBuck = new HashBuck();
            hashBuck.put(1,1);
            hashBuck.put(3,3);
            hashBuck.put(13,13);
            hashBuck.put(5,5);
            hashBuck.put(6,6);
            hashBuck.put(16,6);
            hashBuck.put(8,6);
            hashBuck.put(18,6);

            System.out.println("=====");

            System.out.println(hashBuck.get(6));
            System.out.println(hashBuck.get(61));


        }

        public static void main3(String[] args) {
            Set<String> set = new TreeSet<>();
            set.add("hello");
            set.add("abc");
            set.add("plo");

            System.out.println(set);

            for (String s : set) {
                System.out.println(s);
            }
        }

        public static void main2(String[] args) {
            Map<String,Integer> map = new TreeMap<>();
            TreeMap<String,Integer> map2 = new TreeMap<>();

            map2.put("this",3);

            map2.put("phe",5);

            map2.put("a",7);
            map2.put("a",8888);

            int val = map2.getOrDefault("phe8",1999);
            System.out.println(val);


            Set<String> set = map2.keySet();


            Collection<Integer> collection =  map2.values();

            System.out.println("===");

            Set<Map.Entry<String,Integer>> entries = map2.entrySet();

            for (Map.Entry<String,Integer> entry  : entries) {
                System.out.println("key: "+entry.getKey()+" value: "+entry.getValue());
            }



        }
        public static void main1(String[] args) {
            BinarySearchTree binarySearchTree = new BinarySearchTree();
            binarySearchTree.insert(3);
            binarySearchTree.insert(6);
            binarySearchTree.insert(8);
            binarySearchTree.insert(5);


            binarySearchTree.remove(6);
            System.out.println("===");

        }
    }
